<!doctype html>
<html>
{include file="head.html"}

<body>
<script>
var qsjia={$shop.send_startprice};
</script>
  
<div class="fullscreen">
  <div class="scroll_content">
    <div class="topfixed">
      <div class="t_left"><a href="/index.php?m=shop&shopid={$shop.shopid}"><i class="back"></i></a></div>
      <div class="t_main">商品详情</div>
      <div class="t_right"><a href="" class="share"><i class="ico"></i>分享</a></div>
    </div>
    <div class="paddingheight"></div>
    <div class="comblock">
      <div class="flexslider">
      {get data=imgsdata model=imgs fun=get("shop_product","$product.id")}
      {get data=cart model=shop_order_cart fun=getListByUser()}
        <ul class="slides clearfix">
        {if $imgsdata}
        {foreach item=c from=$imgsdata}
          <li><a href="javascript:;"><img class="img" src="{$c.imgurl|images_site}"></a> </li>
        {/foreach}
        {else}
        	 <li><a href="javascript:;"><img class="img" src="{$product.imgurl|images_site}.middle.jpg" onerror="error_img_url(this,2)"></a> </li>
        {/if}
        </ul>
      </div>
      <div class="product_show">
        <p class="tit">{$product.title}</p>
        <p class="price">价格：￥<b class="red">{$product.price}</b></p>
        <p class="num"> 本月已售：100 份</p>
        <div class="showcart">
        <div class="cart_icon {if $cart[product][$product[id]]}none{/if}" style="position: absolute;
    bottom: 5px;
    right: 10px;"></div>
         <div class="cart_num" object_id="{$product.id}"  {if $cart[product][$product[id]]} style="display:block;"{/if} shopid="{$product.shopid}" productid="{$product.productid}">
              <a class="Decrease" href="javascript:void(0)"><i>-</i></a>
              <input class="Amount" value="{$cart[product][$product[id]][amount]|intval}" autocomplete="off" maxlength="3">
              <a class="Increase" href="javascript:void(0)"><i>+</i></a>
         	</div>
      </div>
      </div>
    </div>
    <div class="comblock"> 产品详情：<br>
    <div id="d-content"> {$product_data.content}</div>
    </div>
 
    
  </div>
</div>
 <div class="bottom_cartfixed">
  <div class="cart"> <i id="end"></i> </div>
  <div class="info" id="shopCart"> 您一共添加了<span class="num" id="cart_num">{$cart.total_num|intval}</span> 件商品<br>
    合计：<b class="num" id="cart_total_money">{$cart.total_money}</b>元 </div>
   <a href="javascript:;" style="{if $cart.total_money > $shop.send_startprice} display:none{/if}" id="shop_lt_qsjia" class="btn">{$shop.send_startprice}元起送</a>
    
    <a href="/index.php?m=shop_order_cart&shopid={$shop.shopid}"  style="{if $cart.total_money <= $shop.send_startprice} display:none{/if}" id="shop_gt_qsjia" class="btn">去结算</a>
</div>
<div id="flyItem" class="fly_item" ><img src="{$skins}img/profile-80.jpg" width="40" height="40"></div>
<script src="{$skins}js/jquery.blocksit.min.js"></script>
<script src="{$skins}js/parabola.js"></script>
<script src="{$skins}js/shop_cart.js"></script>
<script src="/plugin/jquery/flexslider/jquery.flexslider.js"></script>
<link href="/plugin/jquery/flexslider/flexslider.css" rel="stylesheet">
<script>
// 元素以及其他一些变量
var eleFlyElement = document.querySelector("#flyItem"), eleShopCart = document.querySelector("#shopCart");
 
// 抛物线运动
var myParabola = funParabola(eleFlyElement, eleShopCart, {
	speed: 400, //抛物线速度
	curvature: 0.0008, //控制抛物线弧度
	complete: function() {
		eleFlyElement.style.visibility = "hidden";
		
	}
});
 
  $(".showcart .cart_icon").click(function(e) {
    $(this).fadeOut(10).next(".cart_num").fadeIn("fast");
	$(this).parents(".showcart").find(".Increase").trigger("click");
});
  $(".flexslider").flexslider();
  </script>
 
 {include file="footer.html"} 
</body>
</html>
